/**
 * @file parser.h
 * @author your name (you@domain.com)
 * @brief 
 * @version 0.1
 * @date 2024-03-29
 * 
 * @copyright Copyright (c) 2024
 * 
 */
#ifndef __JSASM_PARSER_H__
#define __JSASM_PARSER_H__
#include "src/parsing/parsing.h"
#include "src/parsing/parser-base.h"

// JAVASCRIPT PARSING
class Parser {
    public:
        Parser(Utf16CharacterStream* source) : scanner_(source) {};
        ~Parser() = default;

    private:
        friend bool parsing::ParseProgram();

        friend bool parsing::ParseFunction();

        class ParsingModeScope {
            public:
                ParsingModeScope() = default;
                ~ParsingModeScope() = default;
        };

        void ParseProgram();

        void ParseFunction();

        void DoParseFunction();
        
        void DoParseProgram();

    private:
        Scanner scanner_;
};


#endif // __JSASM_PARSER_H__